/* eslint-disable */
Array.prototype.distinct = function (func) {
  const a = {};
  const b = [];
  const length = this.length;
  for (let item = 0; item < length; item++) {
    const d = func(this[item]);
    if (!a[d]) {
      a[d] = 1;
      b.push(this[item]);
    }
  }
  return b;
}
